package com.db.logger.appender;

import java.io.FileNotFoundException;
import java.io.PrintWriter;

public class FileAppender implements Appender {
    private PrintWriter fileWriter;

    public FileAppender(String filePath) throws FileNotFoundException {
        fileWriter = new PrintWriter(filePath);
    }

    @Override
    public void write(String line) {
        fileWriter.println(line);
        fileWriter.flush();
    }
}
